/* eslint-disable */
(function() {
    if (/Android (\d+\.\d+)/.test(navigator.userAgent)) {
        var version = parseFloat(RegExp.$1);
        if (version > 2.3) {
            var phoneScale = parseInt(window.screen.width) / 750;
            document.write('<meta name=\'viewport\' content=\'width=750, minimum-scale = ' + phoneScale + ', maximum-scale = ' + phoneScale + ', user-scalable=no, target-densitydpi=device-dpi\'>');
        } else {
            document.write('<meta name=\'viewport\' content=\'width=750, user-scalable=no, target-densitydpi=device-dpi\'>');
        }
    } else {
        document.write('<meta name=\'viewport\' content=\'width=750, user-scalable=no, target-densitydpi=device-dpi\'>');
    }

    if (typeof WeixinJSBridge == "object" && typeof WeixinJSBridge.invoke == "function") {
        handleFontSize();
    } else {　　
        if (document.addEventListener) {
            document.addEventListener("WeixinJSBridgeReady", handleFontSize, false);
        } else if (document.attachEvent) {
            document.attachEvent("WeixinJSBridgeReady", handleFontSize);
            document.attachEvent("onWeixinJSBridgeReady", handleFontSize);
        }
    }

    function handleFontSize() {　　 // 设置网页字体为默认大小
        　　
        WeixinJSBridge.invoke('setFontSizeCallback', {
            'fontSize': 0
        });　　 // 重写设置网页字体大小的事件
        　　
        WeixinJSBridge.on('menu:setfont', function() {
            WeixinJSBridge.invoke('setFontSizeCallback', {
                'fontSize': 0
            });
        });　　
    }
}());